package au.edu.unsw.bookmarket.jdo;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import javax.jdo.annotations.PersistenceCapable;

@PersistenceCapable
public class Course {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;
    @Persistent
    private String code;
    @Persistent
    private String name;
    @Persistent
    private String school;
    @Persistent
    private String faculty;
    @Persistent
    private String lecturer;
    @Persistent
    private String session;
    @Persistent
    private boolean predefined;

    public Course(String code, String name, String school, String faculty, String lecturer, String session, boolean predefined) {
        this.code = code;
        this.name = name;
        this.school = school;
        this.faculty = faculty;
        this.lecturer = lecturer;
        this.session = session;
        this.predefined = predefined;
    }

    public Course() {
    }

    public String getSession() {
        return session;
    }

    public void setSession(String session) {
        this.session = session;
    }

    public Key getKey() {
        return key;
    }

    public void setKey(Key key) {
        this.key = key;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    public String getFaculty() {
        return faculty;
    }

    public void setFaculty(String faculty) {
        this.faculty = faculty;
    }

    public String getLecturer() {
        return lecturer;
    }

    public void setLecturer(String lecturer) {
        this.lecturer = lecturer;
    }

    public boolean isPredefined() {
        return predefined;
    }

    public void setPredefined(boolean predefined) {
        this.predefined = predefined;
    }
}
